import { createApp } from "vue";
import "./app.scss";
import "@nutui/nutui-taro/dist/style.css";

import * as utils from "@/utils";
import websocket from "@/network/websocket";
import * as eventBus from "./utils/eventBus";
import { IconFont } from "@nutui/icons-vue-taro";
const App = createApp({
  onShow(options) {},
  // 入口组件不需要实现 render 方法，即使实现了也会被 taro 所覆盖
});

import { Swiper, SwiperItem } from '@nutui/nutui-taro'

App.config.globalProperties.$ws = websocket;
App.config.globalProperties.$utils = utils;
App.config.globalProperties.$toast = utils.toast;
App.config.globalProperties.$storage = utils.storage;
App.config.globalProperties.$router = utils.router;
App.config.globalProperties.$constant = utils.constant;
App.config.globalProperties.$common = utils.common;
App.config.globalProperties.$bus = eventBus;
App.component("IconFont", IconFont);
App.component("Swiper", Swiper);
App.component("SwiperItem", SwiperItem);

export default App;
